Introduction
The Tasks Module provides comprehensive functionality for managing task execution, monitoring progress, and streaming real-time events within the xpander.ai platform.Overview
In this module, you can:- Create and execute tasks with detailed configuration options
- Monitor task execution status and progress in real-time
- Track custom internal status (up to 255 characters) alongside system status
- Stream task events for responsive application development
- Manage task lifecycle including stopping and updating tasks
- Handle both synchronous and asynchronous task operations
Examples
Creating and Executing Tasks
This example demonstrates how to create and execute tasks with both asynchronous and synchronous approaches.Asynchronous Example
Usingacreate()
to create tasks asynchronously:
Synchronous Example
Usingcreate()
to create tasks synchronously:
Retrieving Task Status
Learn how to retrieve and monitor task execution status.Asynchronous Example
Synchronous Example
Streaming Task Events
Monitor real-time task execution with event streaming.Asynchronous Example
Synchronous Example
Managing Task Lifecycle
Control task execution with update and stop operations.Asynchronous Example
Synchronous Example
File Handling for Agno Integration
Demonstrate how to work with tasks that have file attachments and integrate them with Agno agents.Working with Files and Images
Agno Integration Example
Continue to the [Tasks API Reference](/API reference/tasks/API reference) for detailed documentation on classes and methods.
Related Documentation
Agents Module
Agent management and task creation
Events Module
Event-driven programming and real-time streaming
Tools Repository
Tool integration and invocation
Configuration
SDK configuration and authentication
Support
For additional help:- Full SDK Documentation
- Email: dev@xpander.ai